package com.ruoyi.system.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 租户对象 sys_tenant
 *
 * @author ruoyi
 * @date 2023-11-15
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysTenant extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 租户编号 */
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;
    /** 名称 */
    @Excel(name = "名称")
    private String name;
    /** 电话 */
    @Excel(name = "电话")
    private String phone;
    /** 小程序APPID */
    @Excel(name = "小程序APPID")
    private String appid;
    /** 小程序appsecret */
    @Excel(name = "小程序appsecret")
    private String appsecret;
    /** 微信支付商户号 */
    @Excel(name = "微信支付商户号")
    private String mchId;
    /** 微信支付商户密钥 */
    @Excel(name = "微信支付商户密钥")
    private String mchKey;
    /** 支付证书地址 */
    @Excel(name = "支付证书地址")
    private String payCertificateUrl;
    /** apiclient_key.pem证书文件地址 */
    @Excel(name = "apiclient_key.pem证书文件地址")
    private String apiclientKey;
    /** apiclient_cert.pem证书文件地址 */
    @Excel(name = "apiclient_cert.pem证书文件地址")
    private String apiclientCert;
    /** apiV3 秘钥值 */
    @Excel(name = "apiV3 秘钥值")
    private String apiV3Key;
    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;
    /** 租户状态（0正常 1停用） */
    @Excel(name = "租户状态", readConverterExp = "0=正常,1=停用")
    private Integer status;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("name", getName())
                .append("phone", getPhone())
                .append("appid", getAppid())
                .append("appsecret", getAppsecret())
                .append("mchId", getMchId())
                .append("mchKey", getMchKey())
                .append("payCertificateUrl", getPayCertificateUrl())
                .append("apiclientKey", getApiclientKey())
                .append("apiclientCert", getApiclientCert())
                .append("apiV3Key", getApiV3Key())
                .append("expireTime", getExpireTime())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("remark", getRemark())
                .toString();
    }
}
